package com.firefighting.service;

import java.util.Date;
import java.util.HashMap;
import java.util.List;

import javax.faces.view.Location;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.apache.ibatis.annotations.Param;
import com.firefighting.dao.LocationMapper;
import com.firefighting.entity.*;

@Service
public class LocationService {

	@Autowired
	private LocationMapper locationMapper;
	/*Hanjd 删除位置*/
	public int deleteLocation(int id)
	{
		return locationMapper.deleteByPrimaryKey(id);
	}
	
	/*Hanjd 查询位置信息*/
	public com.firefighting.entity.Location queryTask(int id)
	{
		return locationMapper.selectByPrimaryKey(id);
	}
	
	/*Hanjd 根据任务id查询位置信息*/
	public List<com.firefighting.entity.Location> queryLocationId(int taskId)
	{
		return locationMapper.queryLocationId(taskId);
	}
	/*Hanjd 根据企业id查询其所有位置信息*/
	public List<HashMap<String, Object>> queryLocationEnterpriseId(int enterpriseId)
	{
		return locationMapper.queryLocationEnterpriseId(enterpriseId);
	}
	/*Hanjd 根据企业id,人员姓名，起始时间查询其所有位置信息*/
	public List<HashMap<String, Object>> queryLocationSearch(int enterpriseId,String name,int contractName,Date priDay,Date finalDay)
	{
		return locationMapper.queryLocationSearch(enterpriseId, name,contractName, priDay, finalDay);
	}
	//Hanjd 获取企业维保工程师人员列表
}
